package com.github.fujianlian.klinechart.entity;

import java.util.ArrayList;
import java.util.List;

public class EntityGriddingInfo {
    int index; // 网格下标
    double initialPrice; // 网格计算基准价格
    double price; // 当前网格价格
    double stepSizeTop; // 网格的向上步长
    double stepSizeBottom; // 网格的向下步长
    // 操作数量
    int opNum =1;
    //   操作方向  0 不操作 1 买入 2卖出
    int  opBuy = 0;

    // 条目id、
    int itemId;
    //   操作方向  0 不操作 1 买入 2卖出
    //操作类型
    int opType;

    public EntityGriddingInfo(int index, double initialPrice, double price, double stepSizeTop, double stepSizeBottom, int itemId ,
                              //   操作方向  0 不操作 1 买入 2卖出
                              //操作类型
                              int opType ) {

        this.index = index;
        this.initialPrice = initialPrice;
        this.price = price;
        this.stepSizeTop = stepSizeTop;
        this.stepSizeBottom = stepSizeBottom;
        this.itemId = itemId;
        this.opType = opType;
    }

    List<BuyAndSellingRecodeBean> mbuys = new ArrayList<>();
    List<BuyAndSellingRecodeBean> mscales = new ArrayList<>();


    public int getItemId() {
        return itemId;
    }

    public void setItemId(int itemId) {
        this.itemId = itemId;
    }

    public int getOpType() {
        return opType;
    }

    public void setOpType(int opType) {
        this.opType = opType;
    }

    public int getOpNum() {
        return opNum;
    }

    public void setOpNum(int opNum) {
        this.opNum = opNum;
    }

    public int getOpBuy() {
        return opBuy;
    }

    public void setOpBuy(int opBuy) {
        this.opBuy = opBuy;
    }

    public List<BuyAndSellingRecodeBean> getMbuys() {
        return mbuys;
    }

    public void setMbuys(List<BuyAndSellingRecodeBean> mbuys) {
        this.mbuys = mbuys;
    }

    public List<BuyAndSellingRecodeBean> getMscales() {
        return mscales;
    }

    public void setMscales(List<BuyAndSellingRecodeBean> mscales) {
        this.mscales = mscales;
    }

    public double getStepSizeTop() {
        return stepSizeTop;
    }

    public void setStepSizeTop(double stepSizeTop) {
        this.stepSizeTop = stepSizeTop;
    }

    public double getStepSizeBottom() {
        return stepSizeBottom;
    }

    public void setStepSizeBottom(double stepSizeBottom) {
        this.stepSizeBottom = stepSizeBottom;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public double getInitialPrice() {
        return initialPrice;
    }

    public void setInitialPrice(double initialPrice) {
        this.initialPrice = initialPrice;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return
                "id：" + index +
                        ", 基准价" + initialPrice +
                        ", 网格价[  " + price +
                        "  ]"
                ;
    }
}
